# Lesson 3 Creating flying sparks

In this lesson, you create sparks that fly from the molten slag as it slides down the chute. To add realism to the emission and behavior of the sparks without using particle expressions, you set up a two-stage nParticle effect.

In the first stage of the sparks effect, the nParticle slag (nParticle_slag) collides with the nRigid_chute, and triggers a particle collision event. The particle collision event creates a new nParticle object called nParticle_sparks_emitter.

In the second stage, the nParticle_sparks_emitter object is used as a surface emitter source for a third particle system called nParticle_sparks. Particles from the nParticle_sparks object are the simulated sparks visible in the scene. The nParticle _sparks_emitter object does not display in the scene.

To ensure that sparks are emitted in locations and at times that appear random, and in the correct amount, you need to control the number of nParticle_sparks_emitter particles. To do this, you use the Emission Overlap Pruning attribute to emit particles at specific areas along the chute. The result is an effect of randomization without the use of a particle expression or scripting.

It is important that the nParticle systems do not collide with each other. nParticle collisions cause the mesh to break apart as well as create unwanted collision events, which generate too many sparks. To avoid this, you will use Exclude Collide Pairs between each system to prevent nParticles from colliding, while still enabling them to collide with the slag chute.

#### Topics in this section

- Setting up the simulation
- Creating the nParticle collision event
- Creating the nConstraint
- Setting up the second stage of the sparks effect
- Creating the nParticle sparks
- Setting the nParticle Sparks attributes
- Setting the nParticle sparks shading attributes
- Controlling the nParticle spark behavior